#ifndef RECORDWIDGET_H
#define RECORDWIDGET_H

#include <QWidget>
#include <QSqlTableModel>

namespace Ui {
class RecordWidget;
}

class RecordWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RecordWidget(QWidget *parent = 0);
    ~RecordWidget();
    enum{
        NONE,
        PAGE_CHECK,
        PAGE_CLASS
    };
    void setTableInfo(const QString &name,const QMap<QString,QString> titleMap,bool showAll=false);
    void initTvCheck();
    void initTvClass();

private slots:
    void on_btn_checkTab_clicked();

    void on_btn_classTab_clicked();

    void on_btn_back_clicked();

    void on_btn_del_clicked();

    void on_btn_print_clicked();

    void on_btn_export_clicked();

    void on_btn_up_clicked();

    void on_btn_down_clicked();

private:
    Ui::RecordWidget *ui;
    QSqlTableModel* mModel;
    int mCurrPage;
    QMap<QString,QString> mTitleMap;
};

#endif // RECORDWIDGET_H
